package com.qzy.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@MapperScan("com.qzy.demo.mapper")//扫描 mapper包
public class WebTestController {


    @RequestMapping("webTest")
    public String test(){
        log.debug("*************** into method test *********************");
        long beginTime = System.currentTimeMillis();
        log.warn("请求处理结束，耗时：{}毫秒", (System.currentTimeMillis() - beginTime));    //第一种用法
        log.info("请求处理结束，耗时：" + (System.currentTimeMillis() - beginTime)  + "毫秒");
        log.error("请求处理结束，耗时：" + (System.currentTimeMillis() - beginTime)  + "毫秒");
        return "index";
    }

}
